<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>代理商管理</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="381463706">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/manage/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/manage/js/jquery-1.7.1.min.js"></script>

	<script type="text/javascript" src="/manage/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/manage//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/manage/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/manage/css/define.css"/>
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "381463706";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/manage/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/manage/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("agent.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		THIS.setData(protocol.data);
  		
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>

<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		 
	$("#agentForm").form({
		"":function(){}
		,"agent.id":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"agent.member":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"agent.aTop":function(el){
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "上级最大长度为32个字符";
		}
		,"agent.aToptop":function(el){
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "上上级最大长度为32个字符";
		}
		,"agent.updateTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "修改时间不能为空";
			}
		}
		,"agent.addTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "添加时间不能为空";
			}
		}
		,"agent.status":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择状态";
			}
		}
		,"agent.merchant":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>
 
<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>





<form lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'}}" class="form editform edittype_{{edittype}}" ref="Agent" id="agentForm" name="agentForm" target="jsoniframe" action="agent.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt">
				温馨提示：请仔细填写代理商管理相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
					
				
				
	{{lz.set("id_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"id"))))}}
	{{lz.set("id_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$id}}
	<dl lz:if="{{id_editable||id_readonly}}" class="id hidden " major  ref="id">
		<dt>编　　号:</dt>
		<dd lz:if="{{id_editable}}" input="hidden">
			<lz:block lz:if="{{agent$id}}">
				{{agent$id}}
			</lz:block>
			<lz:block lz:if="{{!agent$id}}">
			<input type="hidden" value="{{lz.htm(agent.id)}}" name="agent.id" id="id" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{id_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="id">{{agent.id}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.id$||agent.id)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$id}}
					
				
				
	{{lz.set("member_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"member"))))}}
	{{lz.set("member_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$member}}
	<dl lz:if="{{member_editable||member_readonly}}" class="member  " major  ref="member">
		<dt>会员编号:</dt>
		<dd lz:if="{{member_editable}}" input="query">
			<lz:block lz:if="{{agent$member}}">
				{{agent$member}}
			</lz:block>
			<lz:block lz:if="{{!agent$member}}">
		 			<input title="请输入会员信息昵称进行查询" class="combox narrow" action="/manage/query.Member.do?value={param}" type="text" id="member" name="agent.member" text="{{lz.html(agent.member$||agent.member)}}" value="{{lz.htm(agent.member)}}" />
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{member_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="member">{{agent.member}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.member$||agent.member)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$member}}
					
				
				
	{{lz.set("uid_editable",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='any'&&(lz.idin(fields,"uid"))))}}
	{{lz.set("uid_readonly",(edittype=='insert'&&false)||(edittype=='update'&&true)||(edittype=='detail'))}}
				
	
	{{before$uid}}
	<dl lz:if="{{uid_editable||uid_readonly}}" class="uid hidden " major  ref="uid">
		<dt>用户编号:</dt>
		<dd lz:if="{{uid_editable}}" input="hidden">
			<lz:block lz:if="{{agent$uid}}">
				{{agent$uid}}
			</lz:block>
			<lz:block lz:if="{{!agent$uid}}">
			<input type="hidden" value="{{lz.htm(agent.uid)}}" name="agent.uid" id="uid" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{uid_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="uid">{{agent.uid}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.uid$||agent.uid)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$uid}}
					
				
				
	{{lz.set("nickName_editable",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='any'&&(lz.idin(fields,"nickName"))))}}
	{{lz.set("nickName_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$nickName}}
	<dl lz:if="{{nickName_editable||nickName_readonly}}" class="nickName  " major  ref="nickName">
		<dt>用户名称:</dt>
		<dd lz:if="{{nickName_editable}}" input="text">
			<lz:block lz:if="{{agent$nickName}}">
				{{agent$nickName}}
			</lz:block>
			<lz:block lz:if="{{!agent$nickName}}">
		 	<input type="text" class="input narrow"  maxlength="32" name="agent.nickName" id="nickName"  value="{{lz.htm(agent.nickName)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入代理商管理的用户名称</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{nickName_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="nickName">{{agent.nickName}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.nickName$||agent.nickName)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$nickName}}
					
				
				
	{{lz.set("aTop_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"aTop"))))}}
	{{lz.set("aTop_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$aTop}}
	<dl lz:if="{{aTop_editable||aTop_readonly}}" class="ribs aTop  " major  ref="aTop">
		<dt>上　　级:</dt>
		<dd lz:if="{{aTop_editable}}" input="text">
			<lz:block lz:if="{{agent$aTop}}">
				{{agent$aTop}}
			</lz:block>
			<lz:block lz:if="{{!agent$aTop}}">
		 	<input type="text" class="input narrow"  maxlength="32" name="agent.aTop" id="aTop"  value="{{lz.htm(agent.aTop)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入代理商管理的上级</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{aTop_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="aTop">{{agent.aTop}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.aTop$||agent.aTop)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$aTop}}
					
				
				
	{{lz.set("aToptop_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"aToptop"))))}}
	{{lz.set("aToptop_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$aToptop}}
	<dl lz:if="{{aToptop_editable||aToptop_readonly}}" class="ribs aToptop  " major  ref="aToptop">
		<dt>上 上 级:</dt>
		<dd lz:if="{{aToptop_editable}}" input="text">
			<lz:block lz:if="{{agent$aToptop}}">
				{{agent$aToptop}}
			</lz:block>
			<lz:block lz:if="{{!agent$aToptop}}">
		 	<input type="text" class="input narrow"  maxlength="32" name="agent.aToptop" id="aToptop"  value="{{lz.htm(agent.aToptop)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入代理商管理的上上级</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{aToptop_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="aToptop">{{agent.aToptop}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.aToptop$||agent.aToptop)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$aToptop}}
					
				
				
	{{lz.set("updateTime_editable",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='any'&&(lz.idin(fields,"updateTime"))))}}
	{{lz.set("updateTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$updateTime}}
	<dl lz:if="{{updateTime_editable||updateTime_readonly}}" class="updateTime  " major  ref="updateTime">
		<dt>修改时间:</dt>
		<dd lz:if="{{updateTime_editable}}" input="datetime">
			<lz:block lz:if="{{agent$updateTime}}">
				{{agent$updateTime}}
			</lz:block>
			<lz:block lz:if="{{!agent$updateTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="agent.updateTime" id="updateTime"  value="{{agent.updateTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择代理商管理的修改时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{updateTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="updateTime">{{agent.updateTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.updateTime$||agent.updateTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$updateTime}}
					
				
				
	{{lz.set("addTime_editable",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='any'&&(lz.idin(fields,"addTime"))))}}
	{{lz.set("addTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$addTime}}
	<dl lz:if="{{addTime_editable||addTime_readonly}}" class="addTime  " major  ref="addTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{addTime_editable}}" input="datetime">
			<lz:block lz:if="{{agent$addTime}}">
				{{agent$addTime}}
			</lz:block>
			<lz:block lz:if="{{!agent$addTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="agent.addTime" id="addTime"  value="{{agent.addTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择代理商管理的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{addTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="addTime">{{agent.addTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.addTime$||agent.addTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$addTime}}
					
				
				
	{{lz.set("status_editable",(edittype=='insert'&&false)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"status"))))}}
	{{lz.set("status_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
				
	
	{{before$status}}
	<dl lz:if="{{status_editable||status_readonly}}" class="status  " major  ref="status">
		<dt>状　　态:</dt>
		<dd lz:if="{{status_editable}}" input="select">
			<lz:block lz:if="{{agent$status}}">
				{{agent$status}}
			</lz:block>
			<lz:block lz:if="{{!agent$status}}">
		 	<select class="narrow" id="status" name="agent.status">
		 		<option value="">请选择</option>
				<option value="1" selected='{{agent.status=="1"?"selected":""}}'>正常</option>
				<option value="0" selected='{{agent.status=="0"?"selected":""}}'>无效</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择代理商管理的状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{status_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="status">{{agent.status}}</textarea>
		 		<span>
		 	
			 {{lz.html(agent.status$||agent.status)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$status}}
					
				
				
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{agent.id}}" name="agent.id" id="id" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'}}">
				<button class="button" type="submit">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="$.closeModalDialog();" type="button">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				
				
				
				
				
				
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/agents/agent.edit.html?edittype=update&id={{agent.id}}"'>
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					修改&nbsp;&nbsp;</button>
				
				
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="$.closeModalDialog();" type="button">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>





 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>

</script>
</html>